package com.tim.soundseechina;

import java.io.InputStream;

public class Test {
	private static String LANG_TEXT;
	static {
		InputStream input = Test.class.getResourceAsStream("test.tmp");
		try {
			byte[] data = new byte[input.available()];
			input.read(data);
			LANG_TEXT = new String(data, "GB2312");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public static void main(String argv[]) {
		// testSwitch(60);
		// Supper.createSupper("tim", "zhaopan");
		// Test t = new Test();
		// System.out.println(t.toString());
		// Test t2 = new Test();
		// System.out.println(Integer.toHexString(t2.hashCode()));

		// String str = ",34,25,13,";
		// String[] tempArr = str.split(",");
		// System.out.println(tempArr.length);
		// for (int i = 1; i < tempArr.length; i++) {
		// System.out.println(i + ": " + tempArr[i]);
		// }
		// System.out.println(Integer.parseInt("35,".substring(0,
		// "35,".indexOf(","))));

		System.out.println("读中国- 文化 -鹤顶红灵芝如意".substring("读中国- 文化 -".indexOf("") + "读中国- 文化 -".length()));
	}

	public static String replaceTag(String content, String tagName) {
		StringBuilder temp = new StringBuilder();
		if (!tagName.startsWith("<")) {
			tagName = "<" + tagName;
		}
		String[] tempArr = content.split(tagName);
		for (int i = 0; i < tempArr.length; i++) {
			if (i == 0) {
				temp.append(tempArr[i]);
				continue;
			}
			String tempStr = StringUtil.getStringFromPattern(tempArr[i],
					"(>.*)");
			temp.append(tagName + tempStr);
		}
		if (temp.length() != 0)
			return temp.toString();
		return content;
	}

	public static void testSwitch(int i) {
		switch (i) {
		case 0:
			System.out.println(0);
		case 5:
			System.out.println(5);
		case 8:
			System.out.println(8);
		case 10:
			System.out.println(10);
		default:
			System.out.println("default.");
		case 3:
			System.out.println(3);
		case 7:
			System.out.println(7);
		}
	}
}
